﻿//=====================================================================================================
// LocalizationLibrary
// The Localization Library is a collection of reusable software components that provide 
// support for localization. This library enables you to localize WPF, Silverlight and WP7 applications.
// (http://localizationlibrary.codeplex.com)
//=====================================================================================================
// Author: Nicola Gallo (Website: www.nicola.gallo.name, Email: nicolagmt@hotmail.it) 
//=====================================================================================================

namespace ReflectionStudio.LocalizationLibrary.Messaging
{
    //.NET References
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// Event data for message.
    /// </summary>
    internal class MessageEventArgs : EventArgs
    {
        //Constructors

        /// <summary>
        /// <see cref="MessageEventArgs"/>'s constructor.
        /// </summary>
        /// <param name="message">Message published.</param>
        /// <exception cref="ArgumentNullException">
        /// Thrown whether <paramref name="message"/> parameter is null.
        /// </exception>
        public MessageEventArgs(IMessage message)
        {
            if (message == null)
            {
                throw new ArgumentNullException("message parameter shouldn't be null.");
            }
            this.Message = message;
        }

        //Properties

        /// <summary>
        /// Gets current message.
        /// </summary>
        public IMessage Message { get; private set; }
    }
}